/*
  svelte-scoped将在您的服务器钩子文件中查找以替换unocss_svelte_scoped_global_styles全局样式
*/

/** @type {import('@sveltejs/kit').Handle} */
export async function handle({ event, resolve }) {
	// console.log('Event:', event);
	// console.log('请求的完整 URL:', event.url.href);
	// console.log('请求的路径:', event.url.pathname);
	const response = await resolve(event, {
		transformPageChunk: ({ html }) =>
			html.replace('%unocss-svelte-scoped.global%', 'unocss_svelte_scoped_global_styles')
	});
	return response;
}
